package yanglei.day0109.lottery.constants;

public enum UserStatus {
    one(0, "已持照"),
    two(1, "未持照");
    private int code;
    private String value;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String message) {
        this.value = message;
    }

    UserStatus() {
    }

    UserStatus(int code, String value) {
        this.code = code;
        this.value = value;
    }
    public static UserStatus getUserStatusByCode(int code){
        switch (code) {
            case 0:
                return one;
            case 1:
                return two;
            default:
                return null;
        }
    }
}
